package com.bolt.support.spring.jpa.filter;

import com.bolt.support.query.conditions.domain.SFunction;
import com.bolt.support.query.toolkit.LambdaUtil;
import com.bolt.support.query.toolkit.SerializedLambda;

public class LambdaFilterBuilder<T> extends AbstractFilterWrapper <T, SFunction <T, ?>, LambdaFilterBuilder <T>> {

    @Override
    protected String getProperty(SFunction <T, ?> property) {
        SerializedLambda serializedLambda = LambdaUtil.resolve(property);
        String fieldName = serializedLambda.methodToProperty();
        return fieldName;
    }
}

 